﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using ClassDAL;
using ClassModel;

namespace ClassBLL
{
    public class t_class_classes_BLL
    {
        /// <summary>
        /// 插入课程信息
        /// </summary>
        /// <param name="classes"></param>
        /// <returns></returns>
        public static int InsertClasses(IList<t_class_class> classes)
        {
            if (classes == null) throw new ArgumentException("classes is null");

            return t_class_class_DAL.InsertClasses(classes);
        }


        /// <summary>
        /// 根据fileid 获取class信息
        /// </summary>
        /// <param name="fileid">对应的上传的 excel文件 id</param>
        /// <returns></returns>
        public static List<t_class_class> GetClassListWithFileId(int fileid)
        {
            return t_class_class_DAL.GetClassListWithFileId(fileid);
        }

        /// <summary>
        /// 根据班级id获取班级信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public static t_class_class GetClassInfoById(int id)
        {
            return t_class_class_DAL.GetClassInfoById(id);
        }

         /// <summary>
        /// 获取某个excel表格里最小班级id
        /// </summary>
        /// <param name="fileid"></param>
        /// <returns></returns>
        public static int GetMinClassId(int fileid)
        {
            return t_class_class_DAL.GetMinClassId(fileid);
        }
    }
}
